package com.example.test;

import com.alibaba.fastjson.JSON;

import java.util.Arrays;
import java.util.List;

public class test01 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3);
        String s = JSON.toJSONString(list);
        System.out.println(s);
        while (true){
            System.out.println(1);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            extracted();
            System.out.println(3);
        }
    }

    private static void extracted() {
        while (true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(2);
        }
    }

}
